﻿<UserControl x:Class="WetHatLab.OneNote.TaggingKit.find.TagSelector"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:prop="clr-namespace:WetHatLab.OneNote.TaggingKit.Properties"
             mc:Ignorable="d"
             Name="tagSelector">
    <ToggleButton Name="tb"
                  Background="White"
                  BorderBrush="LightBlue"
                  IsChecked="{Binding ElementName=tagSelector, Path=IsChecked, Mode=TwoWay}"
                  ToolTip="{Binding Mode=OneTime, Source={x:Static prop:Resources.TagSelector_Tooltip}}">
        <StackPanel Orientation="Horizontal">
            <TextBlock VerticalAlignment="Bottom" >
                <Run Text="{Binding ElementName=tagSelector,Path=TagName}"/><Run Text=" ("/><Run Text="{Binding ElementName=tagSelector,Path=PageCount}" /><Run Text=")" />
            </TextBlock>
            <CheckBox VerticalAlignment="Bottom" IsChecked="{Binding ElementName=tagSelector, Path=IsChecked, Mode=TwoWay}" BorderThickness="0" Background="Transparent"/>
        </StackPanel>
    </ToggleButton>
</UserControl>
